import { https, testTime, destroy } from "./utils/index";

class React {
  constructor() {
    this.name = "一缕清风";
  }

  @testTime()
  @destroy('销毁发布订阅')
  componentDidMount() {
    let { resultCode, data } = this.handleRequest({ sex: "男" })
    if (resultCode == 200) {
      console.log("this.name", this.name);
    }
  }

  @https('app/login', 'get')
  handleRequest(requestParasm) {
    console.log("这是发送给后台的数据", { name: "一缕清风", age: 25, ...requestParasm });
    return { name: "一缕清风", age: 25, ...requestParasm }
  }
}


let react = new React();
react.componentDidMount();